﻿CREATE TRIGGER [dbo].[tr_Car_BookValues_Reset]
ON [dbo].[t_Car] 
FOR UPDATE
AS


IF UPDATE (VIN) OR 
UPDATE(VIN) OR
UPDATE(VIN_9) OR
UPDATE(Mileage) OR
UPDATE(Make) OR
UPDATE(Model) OR
UPDATE(Series) OR
UPDATE(Body_Style)

DELETE   t_CarInfo_BookValues
FROM         t_CarInfo_BookValues INNER JOIN
                      inserted t_Car ON t_CarInfo_BookValues.VIN = t_Car.VIN
